<template>
  <div>
    <AdvancedSearch @searchTrademark="searchTrademark" @searchIntelligences='searchIntelligences' @clickDetails='clickDetails' @rowClick='rowClick'></AdvancedSearch>
  </div>
</template>

<script>
import AdvancedSearch from "@/components/AdvancedSearch";
export default {
  components: {
    AdvancedSearch,
  },
  data() {
    return {
      
    };
  },
  async mounted() {
    try {
      
    } catch (e) {
      this.$message.error(e.message);
    }
  },
  methods: {
    rowClick(row) {
        // this.$router.push({
        //   path: "/detail",
        //   query: { pid: row.pid, ano: row.ano },
        // });

      const { href } = this.$router.resolve({
        path: "/detail",
        query: { 
          pid: row.pid, 
          ano: row.ano,
          preview:1,
          shunqiNewWebType: 0
         },
      });
      window.open(href, "_blank");

    },
    clickDetails(item){
      sessionStorage.setItem("pc", 0);
      this.$router.push({ path: "/detail", query: { pid: item.pid } });
    },
    searchIntelligences(inputVal) {
      this.$router.push({ path: "/shundeSearchNew", query: { val: inputVal,type: 1 } });
    },
    searchTrademark(inputVal,type) {
      this.$router.push({ path: "/shundeSearchNew", query: { val: inputVal, typeVal: type , type: 2 } });
    },
  },
};
</script>

<style scoped lang="less">

@media (max-width: 1360px) {
}

@media (max-width: 750px) {

}
</style>
